<?php /* Smarty version Smarty-3.1.6, created on 2013-05-05 21:27:36
         compiled from "D:\Wamp\www\erp2.1\DzhPHP\FrameWork/Tpl\User\edit.tpl" */ ?>
<?php /*%%SmartyHeaderCode:244651865e4836e443-69997236%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '7d34163b5fd34e272732eaddc45a82e1c4c09d41' => 
    array (
      0 => 'D:\\Wamp\\www\\erp2.1\\DzhPHP\\FrameWork/Tpl\\User\\edit.tpl',
      1 => 1365400672,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '244651865e4836e443-69997236',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'rs' => 0,
    'lang' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.6',
  'unifunc' => 'content_51865e485c9c5',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_51865e485c9c5')) {function content_51865e485c9c5($_smarty_tpl) {?><?php if (!is_callable('smarty_function_wz')) include 'D:\\Wamp\\www\\erp2.1\\DzhPHP\\FrameWork\\Extend\\Vendor\\Smarty\\plugins\\function.wz.php';
?><input type="hidden" id="url_2" value="<?php echo U('/AutoComplete/client');?>
">
<input type="hidden" id="url_3" value="<?php echo U('/AutoComplete/factory');?>
">
<form method="POST" action="<?php echo U('User/update');?>
" onsubmit="return false">
<input type="hidden" name="id" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['id'];?>
">
<?php echo smarty_function_wz(array('action'=>"save,list,reset"),$_smarty_tpl);?>

<div class="add_box">
  <table cellspacing="0" cellpadding="0" class="add_table">
    <tbody>   
    <tr>
      <td class="width10"><?php echo $_smarty_tpl->tpl_vars['lang']->value['user_type'];?>
：</td>
      <td class="t_left">
      	<select name="user_type" combobox onchange="setCompanyUrl(this.value)">
      	<option value="1" <?php if ($_smarty_tpl->tpl_vars['rs']->value['user_type']==1){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['lang']->value['company'];?>
</option>
      	<option value="2" <?php if ($_smarty_tpl->tpl_vars['rs']->value['user_type']==2){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['lang']->value['client'];?>
</option>
      	<option value="3" <?php if ($_smarty_tpl->tpl_vars['rs']->value['user_type']==3){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['lang']->value['factory'];?>
</option>
      	</select>__*__
      </td>
    </tr>
     <tr>
      <td><?php echo $_smarty_tpl->tpl_vars['lang']->value['use_usbkey'];?>
：</td>
      <td class="t_left">
      	<select name="use_usbkey" onchange="javascript:if(this.value==1){ $dom.find('#td_usekeylicens').show()}else{ $dom.find('#td_usekeylicens').hide();$dom.find('#usbkey').val('')}" combobox>
      	<option value="0" <?php if ($_smarty_tpl->tpl_vars['rs']->value['use_usbkey']==0){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['lang']->value['no'];?>
</option>
      	<option value="1" <?php if ($_smarty_tpl->tpl_vars['rs']->value['use_usbkey']==1){?>selected<?php }?>><?php echo $_smarty_tpl->tpl_vars['lang']->value['yes'];?>
</option>
      	</select>__*__
      </td>
    </tr>
     <tr id="td_usekeylicens" <?php if ($_smarty_tpl->tpl_vars['rs']->value['use_usbkey']==0){?>style="display:none;"<?php }?>>
      <td><?php echo $_smarty_tpl->tpl_vars['lang']->value['use_usbkey_licens'];?>
：</td>
      <td class="t_left">
      	<input type="hidden" name="usbkey" id="usbkey" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['usbkey'];?>
">
      	<input type="text" url="<?php echo U('/AutoComplete/epass');?>
" where="<?php echo urlencode("id not in (select usbkey from user where to_hide=1)");?>
" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['epass_no'];?>
" jqac> 
      	__*__
      </td>
    </tr>
    <tr>
      <td><?php echo $_smarty_tpl->tpl_vars['lang']->value['user_name'];?>
：</td>
      <td class="t_left">
      	<input type="text" name="user_name" id="user_name" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['user_name'];?>
" class="spc_input" />__*__      
      </td>      
    </tr>    
    <tr>
      <td><?php echo $_smarty_tpl->tpl_vars['lang']->value['real_name'];?>
：</td>
      <td class="t_left" id="td_user_name"> 
      <input type="text" url="<?php echo U('/AutoComplete/employee');?>
" id="employee_name" name="real_name" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['real_name'];?>
" jqac>
       	<?php echo smarty_function_quicklyAdd(array('module'=>"Employee"),$_smarty_tpl);?>

       	
      </td>      
    </tr>    
    <tr>
      <td><?php echo $_smarty_tpl->tpl_vars['lang']->value['belong_role'];?>
：</td>
      <td class="t_left">
      	<input type="hidden" name="role_id" id="role_id" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['role_id'];?>
" />
     	<input type="text" url="<?php echo U('/AutoComplete/role');?>
" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['role_name'];?>
" jqac>__*__
     </td>
    </tr>  
    <?php if ($_smarty_tpl->tpl_vars['rs']->value['user_type']>1){?>
    <tr id="company_tr">
      <td><?php echo $_smarty_tpl->tpl_vars['lang']->value['belong_company'];?>
：</td>
      <td class="t_left" id="company_tr_td">
      <input type="hidden" name="company_id" id="company_id" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['company_id'];?>
">
      <input type="text" id="company" <?php if ($_smarty_tpl->tpl_vars['rs']->value['user_type']==2){?>url="<?php echo U('/AutoComplete/client');?>
"<?php }elseif($_smarty_tpl->tpl_vars['rs']->value['user_type']==3){?>url="<?php echo U('/AutoComplete/factory');?>
"<?php }?> jqac value="<?php if ($_smarty_tpl->tpl_vars['rs']->value['client_id']){?><?php echo $_smarty_tpl->tpl_vars['rs']->value['client_name'];?>
<?php }else{ ?><?php echo $_smarty_tpl->tpl_vars['rs']->value['factory_name'];?>
<?php }?>">__*__
      </td>
    </tr>
    <?php }else{ ?>
    <tr id="company_tr" style="display:none">
      <td><?php echo $_smarty_tpl->tpl_vars['lang']->value['belong_company'];?>
：</td>
      <td class="t_left" id="company_tr_td">
      <input type="hidden" name="company_id" id="company_id">
      <input type="text" id="company" url="">__*__
      </td>
    </tr>
    <?php }?>
    <tr>
      <td><?php echo $_smarty_tpl->tpl_vars['lang']->value['user_ip'];?>
：</td>
      <td class="t_left">
      	<input type="text" name="user_ip" id="user_ip" value="<?php echo $_smarty_tpl->tpl_vars['rs']->value['user_ip'];?>
" class="spc_input" /> (<?php echo $_smarty_tpl->tpl_vars['lang']->value['user_ip_separator'];?>
)
      </td>
    </tr>
    <tr>
      <td valign="top"><?php echo $_smarty_tpl->tpl_vars['lang']->value['comments'];?>
：</td>
      <td class="t_left"> 
      	<textarea name="comments" id="comments"><?php echo $_smarty_tpl->tpl_vars['rs']->value['edit_comments'];?>
</textarea>
      </td>
    </tr>
    </tbody>
  </table> 
</div>
</form><?php }} ?>